package cn.com.code.hwjs;

import java.util.Scanner;

/**
 * HJ38 求小球落地5次后所经历的路程和第5次反弹的高度
 * https://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446?tpId=37&tqId=21261&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fdifficulty%3D3%26page%3D1%26pageSize%3D50%26search%3D%26tpId%3D37%26type%3D37&difficulty=3&judgeStatus=undefined&tags=&title=
 * @author zhengpei
 * @date 2022/4/27
 */
public class Hwjs38 {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while (sc.hasNext()) {
      double s = Double.valueOf(sc.nextLine());
      System.out.println(s * (1 + 2 * Math.pow(0.5, 1) + 2 * Math.pow(0.5, 2) + 2 * Math.pow(0.5, 3) + 2 * Math.pow(0.5, 4)));
      System.out.println(s * (Math.pow(0.5, 5)));
    }
  }

}
